<template>
  <div>
    <el-button @click="drawer = true" type="primary" style="margin-left: 16px;">
      点我打开
    </el-button>


    <el-drawer title="支付" style="text-align: center;font-size: 20px;" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
      <div><img src="../assets/images/01.jpg"  style="width: 150px;height: 150px;"/></div>
      <el-button type="danger" plain @click="toConsume">确认支付</el-button>
    </el-drawer>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        drawer: false,
        direction: 'ttb',
      };
    },
    methods: {
      handleClose(done) {
        this.$confirm('确认取消支付？')
          .then(_ => {
            done();
          })
          .catch(_ => {});
      },
      async toConsume(){
        // this.$http.post("")
         this.drawer=false

      }
    }
  };
</script>

<style>
</style>
